const getModel = require('./api/getModel')

const structure = {
  id: {
    type: Number,
    required: true
  }, // 学号
  name: {
    type: String,
    required: true
  },
  gender: {
    type: Number,
    enum: [-1, 0, 1],
    default: -1 // 不详
  },
  major: {
    type: String,
    required: true,
    default: '计算机科学与技术'
  },
  grade: {
    type: Number,
    required: true,
    default: 2019
  },
  object: {
    type: String,
    required: true,
  },
  score: {
    type: Number,
    required: true
  }
}

module.exports = getModel('feidian', 'students', structure)